﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WXYW.BLL;
using WXYW.Model;

namespace WXYW
{
    public partial class YJTJ : System.Web.UI.Page
    {
        public List<YJStationModel> YJStationModelList;
        public List<YJPersonModel> YJPersonModelList;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindSummaryInfo();
                BindYJStationModelList();
                BindYJPersonModelList();
            }
        }

        private void BindSummaryInfo()
        {
            YJTJService service = new YJTJService();
            WXZQAverageDaysLbl.Text = service.GetWXZQAverageDays().ToString();
            BJZQAverageDaysLbl.Text = service.GetBJZQAverageDays().ToString();
            FCZQAverageDaysLbl.Text = service.GetFCZQAverageDays().ToString();
            BAOJZQAverageDaysLbl.Text = service.GetBAOJZQAverageDays().ToString();
            FHZQAverageDaysLbl.Text = service.GetFHZQAverageDays().ToString();
            SJZQAverageDaysLbl.Text = service.GetSJZQAverageDays().ToString();

            WXCountLbl.Text = service.GetWXCount().ToString();
            BAOJCountLbl.Text = service.GetBAOJCount().ToString();
            FCCountLbl.Text = service.GetFCCount().ToString();
            BJCountLbl.Text = service.GetBJCount().ToString();
            FHCountLbl.Text = service.GetFHCount().ToString();
            SJCountLbl.Text = service.GetSJCount().ToString();
        }

        private void BindYJStationModelList()
        {
            YJTJService service = new YJTJService();
            YJStationModelList = service.GetYJStationInfo();
        }

        private void BindYJPersonModelList()
        {
            YJTJService service = new YJTJService();
            YJPersonModelList = service.GetYJPersonInfo();
        }
    }
}
